<template>
    <div>
        <el-form-item label="面积显示">
            <el-radio-group v-model="mijiIsShow" @change="changeRadio">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="0">否</el-radio>
            </el-radio-group>
        </el-form-item>
        <common-echart :data="data" type="bar" :form-list="formList"></common-echart>
    </div>
</template>
<script>
import CommonEchart from './CommonEchart'
import {getEchartByType} from '@/api/api'
export default {
    name: 'SetLineEchart',
    components: {
        CommonEchart
    },
    props: {
        data: {
            type: Object
        },
        selectDict: {
            type: Array
        },
        formList: {
           type: Array 
        }
    },
    data(){
        return {
           mijiIsShow: 1,
        }
    },
    methods: {
        changeRadio(val) {
            if(val){
                this.data.options.series.map(item=>{
                    item.areaStyle.normal.opacity = 0.1
                })
            } else {
                this.data.options.series.map(item=>{
                    item.areaStyle.normal.opacity = 0
                })
            }
        }
    }
}
</script>
<style lang="scss" scoped>
    .colors{
        display: block;
        li{
            display: inline-block;
            width: 30px;
            height: 20px;
            margin-left: 5px;
        }
    }
</style>
